﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NQQOpenApi
{
    /// <summary>
    /// 封装获取到的AccessToken数据
    /// </summary>
    [Serializable]
    public class PCAccessToken
    {
        /// <summary>
        /// 
        /// </summary>
        [JsonIgnore]
        public ErrorMessage Error { get; set; }

        /// <summary>
        /// 授权令牌，Access_Token
        /// </summary>
        [JsonProperty(PropertyName = "access_token")]
        public string AccessToken { get; set; }

        /// <summary>
        /// 该access token的有效期，单位为秒。
        /// </summary>
        [JsonProperty(PropertyName = "expires_in")]
        public int Expires_in { get; set; }

        /// <summary>
        /// 在授权自动续期步骤中，获取新的Access_Token时需要提供的参数。
        /// </summary>
        [JsonProperty(PropertyName = "refresh_token")]
        public string RefreshToken { get; set; }
    }
}
